import request from "@/utils/request3";

export function getTask(page, size, condition,name) {
  return request({
    url: '/Task/taskList',
    method: "get",
    params: {page:page,size:size,condition:condition,name:name},
  });
}

export function getDetail(code) {
    return request({
      url: '/Task/detail',
      method: "get",
      params: {code:code},
    });
  }

  export function InsList(page, size, deviceCode) {
    return request({
      url: '/details/InsList',
      method: "get",
      params: {page:page,size:size,deviceCode:deviceCode},
    });
  }

  export function selectList(code) {
    return request({
      url: '/details/selectList',
      method: "get",
      params: {code:code},
    });
  }

export function updateState(map) {
  return request({
    url: '/details/updateDetailState',
    method: "post",
    data: JSON.stringify(map),
    header: {
      "Content-Type": "application/json", //如果写成contentType会报错
    },
  });
}

export function updateTask(map) {
  return request({
    url: '/Task/updateTask',
    method: "post",
    data: JSON.stringify(map),
    header: {
      "Content-Type": "application/json", //如果写成contentType会报错
    },
  });
}

export function updateSkip(map) {
  return request({
    url: '/Task/updateSkip',
    method: "post",
    data: JSON.stringify(map),
    header: {
      "Content-Type": "application/json", //如果写成contentType会报错
    },
  });
}



export function adjustTask(map) {
  return request({
    url: '/Task/adjustTask',
    method: "post",
    data: JSON.stringify(map),
    header: {
      "Content-Type": "application/json", //如果写成contentType会报错
    },
  });
}
